//
//  MyNotesTableViewCell.m
//  JiuKuGospel
//
//  Created by jiukuyinyue on 15-11-21.
//  Copyright (c) 2015年 JiuKuForApp. All rights reserved.
//

#import "MyNotesTableViewCell.h"

@implementation MyNotesTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setCreateStr:(NSString *)createStr
{
    [self setupUI];
}
- (void)setupUI
{
    self.backgroundColor = [UIColor clearColor];
    [self.allView removeFromSuperview];
    self.allView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height)];
    [self addSubview:self.allView];

    self.titleLabel = [[UILabel alloc] init];
    self.timeLabel.textColor = titleColorLSZ;
    [_allView addSubview:_titleLabel];

    self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth-_allView.width/3, _titleLabel.top,_allView.width/3-10, _titleLabel.height)];
    _timeLabel.textAlignment = NSTextAlignmentRight;
    _timeLabel.textColor = lightColor;
    [_allView addSubview:_timeLabel];

    self.contentLabel = [[UILabel alloc] init];
    self.contentLabel.textColor = lightColor;
    self.contentLabel.numberOfLines = 0;
    [_allView addSubview:_contentLabel];

    self.aboutLabel = [[UILabel alloc] init];
    _aboutLabel.textColor = redUIColor;
    [_allView addSubview:_aboutLabel];
    if (ScreenWidth == 320) {
        _titleLabel.font = FONT_(13.5);
        _timeLabel.font = FONT_(13.5);
        _contentLabel.font = FONT_(13.5);
        _aboutLabel.font = FONT_(12.5);
        _titleLabel.frame = CGRectMake(10,10,_allView.width/2,16);
        _contentLabel.frame = CGRectMake(_titleLabel.left, _titleLabel.bottom+5, _allView.width-2*10, 16);
        _aboutLabel.frame = CGRectMake(_contentLabel.left, _contentLabel.bottom+4, _allView.width, 14);
    }else if(ScreenWidth == 375){
        _titleLabel.frame = CGRectMake(10,10,_allView.width/2,18);
        _titleLabel.font = FONT_(14);
        _timeLabel.font = FONT_(14);
        _contentLabel.font = FONT_(14);
        _contentLabel.frame = CGRectMake(_titleLabel.left, _titleLabel.bottom+5, _allView.width-2*10, 18);
        _aboutLabel.font = FONT_(13 );
        _aboutLabel.frame = CGRectMake(_contentLabel.left, _contentLabel.bottom+4, _allView.width, 16);
    }else {
        _titleLabel.frame = CGRectMake(10,10,_allView.width/2,20);
        _titleLabel.font = FONT_(14.5);
        _timeLabel.font = FONT_(14.5);
        _contentLabel.font = FONT_(14.5);
        _contentLabel.frame = CGRectMake(_titleLabel.left, _titleLabel.bottom+5, _allView.width-2*10, 20);
        _aboutLabel.font = FONT_(13.5);
        _aboutLabel.frame = CGRectMake(_contentLabel.left, _contentLabel.bottom+4, _allView.width, 18);
    }
}

@end
